package com.tanhua.dubbo.api;

import com.tanhua.domain.db.Log;
import com.tanhua.dubbo.api.db.LogApi;
import com.tanhua.dubbo.mapper.LogMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

@Service
public class LogApiImpl implements LogApi {

    @Autowired
    private LogMapper logMapper;

    @Override
    public void save(Log log) {
        logMapper.insert(log);
    }


    @Override
    public Integer queryNumRegisteredOrLogin(String todayStr, String type) {
        return logMapper.queryNumRegisteredOrLogin(todayStr,type);
    }

    @Override
    public Integer queryNumActive(String todayStr) {
        return logMapper.queryNumActive(todayStr);
    }

    @Override
    public Integer queryNumRetention1d(String todayStr, String yesTodayStr) {
        return logMapper.queryNumRetention1d(todayStr,yesTodayStr);
    }
}
